package com.mdd.front.validate.login;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

@Data
@ApiModel("账号登录参数")
public class LoginPwdValidate {

    //@NotNull(message = "username参数缺失")
    //@NotEmpty(message = "账号不能为空")
    @ApiModelProperty(value = "登录账号", required = true)
    private String username;

    //@NotNull(message = "password参数缺失")
    //@NotEmpty(message = "密码不能为空")
    @ApiModelProperty(value = "登录密码", required = true)
    private String password;
    
    
    @NotNull(message = "mobile参数缺失")
    @NotEmpty(message = "手机号码不能为空")
    @ApiModelProperty(value = "手机号码", required = true)
    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobile;
    
    //@NotNull(message = "mobileCode参数缺失")
    //@NotEmpty(message = "验证码不能为空")
    @ApiModelProperty(value = "手机验证码", required = true)
    private String mobileCode;
    
    
    @ApiModelProperty(value = "邀请码")
    private String inviteCode;
}
